Add MIDI GUI tab and learn function#3502
Add MIDI GUI tab and learn function#3502ignotus666 wants to merge 1 commit intojamulussoftware:mainfrom
Conversation
|
Thanks for this contribution. It looks like a useful feature. I will be happy to test it in due course, on Linux, Windows and Mac, but at the moment most of my kit is packed away for a pending house move. |
|
@softins thanks - no worries, I guess there will be plenty of time for testing before this ever makes it in (if it does). Hope the house move goes smoothly. |
|
Nice! I'd like to open a discussion:
|
In any event, this is still under development as I'm finding that some of my implementations are far from perfect. E.g. the way the MIDI in port is currently kept open I think has been done wrong, so I'm working on that. I'm testing a version where the MIDI port can be enabled/disabled at runtime, as among other things it affects whether numbers are prepended to user names in the mixer board - if you're not using MIDI you won't want that. The main purpose for opening this PR was to generate builds for other platforms for testing, but for now it's just a PoC that's far from finished, so any suggestions are welcome. |
|
Tested on Linux, Windows (no JACK) and macOS (legacy and non-legacy), and it seems to be working on these three platforms at least. |
|
OK just stumbled onto this. As this is a new feature, the following need to be adhered to:
(The "learn" feature for JSONRPC would just be the eventual "set X to Y" update, the visual behaviour would be for the JSONRPC user to supply - it just needs to be able to send the same update to the core code as the Client UI.) |
pljones
left a comment
There was a problem hiding this comment.
Get rid of all the unnecessary changes in spacing and resubmit the PR. As it stands, I can't review it.
Done. Those keep getting added in by clang.
It's been almost a year since I did this, but as far as I recall it updates the main application state via pSettings and pClient. |
|
I believe this should be rebased and squashed into one commit. |
It looks pretty good -- as @ann0see says, please rebase and squash. Then check the resultant diff for anything obvious 😄 - it looks mostly okay to me but there's a few places I'm not sure what was being intended, so I might have some more questions. One thing I might ask is for the command line parsing code to be moved into |
fe82247 to
7097b29
Compare
Done.
Done. I don't know what clang is whining about - I can't use it because it reformats a ton of stuff that shouldn't be. |
Known issue. We should really bump the clang format version. Otherwise be sure to use the same clang format version as used in the CI |
I've been working on this - should the UI immediately reflect changes from JSONRPC commands sent? It doesn't seem to do this for the existing commands but just to confirm. |
The problem is that in the TODO blocks, the TODO lines don't have a space after |
26f4096 to
1f2f394
Compare
0bd87d6 to
688e11c
Compare
|
If the command line is specified at all, then nothing should be written back to settings, IIRC? Not that there's any examples for the client but I think the server works like that (if you run the GUI and specify a Directory to register with, then change it in the UI, I don't think it gets updated in settings). As I've mentioned, there's a lot of discussion about how that should work... To me, if I've set everything in the UI and then as a one off run with And I probably want the saved settings for any |
|
(Approximation again in markdown...)
and make sure the width on the spinner and its container can expand as needed. |
That should fix your branch iOS build. You should keep |
c8e251d to
355183e
Compare
I agree. But after having a look, the server settings actually behave more or less the way the MIDI settings do now: they skip reading the ini file if the command line option is present and later write any command line-specified values to the ini file later. What to do with non-specified controls in MIDI commands is a different matter though because AFAICT it's the only command line option that has a number of optional parameters within it, so there's not really a precedent for that scenario. I agree that they should be left alone and at most just disabled, not overwritten with defaults. Though this requires changing the current approach where the command line is checked first, to reading the xml and then checking the command line. The latest version does this:
I also fixed a bug where the "Learn" buttons for disabled controls would become active after using Learn for an active control.
It's those stupid up/down arrows that take up so much space. Please check the latest version to see if it's fixed. Oh, and another thing - please test launching a server. After years of being able to launch and connect my own, my bl**dy ISP has changed its policy and now I'm behind CGNAT and no IPv6 available, so I can't test that. It should be fine, but just in case. |
I've no IPv6, either. IPv4 registered okay with Any Genre 1 and one of my local Directories. Local connection worked fine. I'm seeing from the client (Audio, UI and Client threads, I think) and from the server (UI and Server threads) when the UI shuts down normally. @softins any idea what this is about? ... I'm vaguely remembering it was mentioned somewhere before... |
I've seen it too. I think it's been around for a while, but as it only happens when exiting, it doesn't seem to be a problem. I have never investigated the cause. |
Urgh. But you might be able to use Hurricane Electric tunnels to enable IPv6. I'd open a support ticket with the ISP saying something like your "connectivity is broken for IPv6 and you need it". |
AI put me out of a job there, it seems :-) BTW regarding, "if I disable a control temporarily, I don't want to have to go through the process of setting the value again to get it working" - this is something I used to summarise as "user input is sacred". The ideal app never discards anything you do, or prevents you from undoing what you did. This can of course lead to technical complications, but by far and away the worst UX is lost work (even if that "work" is seemingly trivial like having to re-type a digit). |
483ddf0 to
c516b54
Compare
Followed this suggestion and I think it's better now. Please check on Windows 11 to see if we're there yet with the spinboxes (I added minimum width).
It's tricky to find a balance between consistency with current behaviour (command line overrides and overwrites previous settings) and not discarding previously saved (but not currently used) settings, so I think a compromise where omitted controls on the command line are disabled (not including them is taken as a wish not to use them) but values are preserved is acceptable. |
6e93188 to
d157c48
Compare
Rang them this morning. A customer for 20+ years and they wanted more money on top of an already extortionate price, so I talked to another ISP that will disable CGNAT and charge me 1/3 for the same package... Silly me for not checking sooner but at least a nice side-effect of this PR : ) |
|
The Mute Myself box looks perfectly aligned on my Linux PC but I think I know what the issue is. I'll have a look at that and another couple of things I want to correct later on tonight, and then set it ready for review. |
d157c48 to
d4c3398
Compare
|
I think the alignment should be fixed now. |
d4c3398 to
ef3d6a6
Compare
|
At the risk of stretching this too far, there's a bonus feature that I worked on last year and is ready to be added (or can wait): MIDI pickup mode. This is a handy feature particularly if you use MIDI CC banks in your controller: you've set a fader or pan control to a certain value (let's say 100%) and change banks to use the same knob to nudge the fader or pan of another strip from say 30% to 10%. Without pickup mode that control will immediately jump to 100% before you can lower it, and with pickup mode enabled it will wait for you to match the position before moving. I haven't included it in this PR but you can find builds here, and see the logic, which is chiefly in It's supported on the command line (add
|







Adds a MIDI tab to the Settings menu and exposes the MIDI parameters so they can be changed via the GUI. MIDI CC numbers can be automatically set using "learn" buttons that when pressed, listen for an incoming MIDI message and store it. Starting Jamulus with
--ctrlmidichcommand line arguments overrides and replaces those set via the GUI.The MIDI-in port can be enabled/disabled at runtime instead of it being determined at launch by the
--ctrlmidichparameter or by making it permanently open. This means that user names are prepended by a number depending on whether the MIDI in port has been enabled or not (as is the case now).I've also ditched the "Offset" term, at least for the GUI. It's a hangover from the days when that's what it was, a value hard-coded for a specific Behringer device, but in the current context it no longer makes sense.
EDIT: Added JSONRPC support.
CHANGELOG: Client: Added MIDI tab to Settings GUI exposing MIDI parameters. MIDI Learn feature also added.
Context: Fixes an issue?
Does this change need documentation? What needs to be documented and how?
Needs to be documented.
Status of this Pull Request
Working on Linux, Windows and macOS but should be tested more thoroughly.
What is missing until this pull request can be merged?
Further testing and code review.
Checklist